import { createRouter, createWebHistory } from 'vue-router';
import BookAddOrUpdate from '@/views/BookAddOrUpdate.vue';
import BookList from '@/views/BookList.vue';
const routes = [
  {
    path: '/',
    component: BookList
  },
  {
    path: '/addorupdate/:id?',
    component: BookAddOrUpdate
  }
];

const router = createRouter({
  history: createWebHistory(),
  routes
});

export default router;